<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<div class="pro_list fr"  >
   <div class="title"  >
   	 <span class="titletxt">您现在的位置：</span>
     <ul> 
       <li class="root">会员中心</li>        
     </ul>
   </div>
  <c:if test="${not empty ret }">
   	<c:if test="${ret.code ne '200'}">
   		<script type="text/javascript">alertError('${ret.result}');</script>
   		<div id=messager class="messager" >
	         <div class="contentmsg">
	             <h5>提示信息～！</h5>
	             <ul>
	               <li>${ret.result}</li>
	             </ul>
	        </div>
	     <div class="closer" onClick="showHideLayer('messager');" title="关闭"></div>
	    </div>
   	</c:if>
   
  </c:if>

     
</div>
<div id="dlg-buttons" style="display: none;">
     <table cellpadding="0" cellspacing="0" style="width: 90%">
         <tr>
             <td style="text-align: center;">
                 <a href="#" class="easyui-linkbutton"   iconcls="icon-save"  onclick="javascript:savecompact()">同意</a>
                 <a href="#" class="easyui-linkbutton" iconcls="icon-cancel" onclick="javascript:$('#compact_win').dialog('close')">拒绝</a>
             </td>
         </tr>
     </table>
</div>
<c:if test="${not empty sessionScope.WEB_USER_TOKEN}">
<%-- 	<c:if test="${sessionScope.WEB_USER_TOKEN.userType eq '2' && sessionScope.WEB_USER_TOKEN.isCompact eq '0' }">
	  	<script>
			//弹出合同签订
			$.pmsDialog({
				id:'compact_win',
				title:'签订网上交易合同',
				method:'post',
				href:'<c:url value="/views/jsp/center/compact/compact_detail.jsp"/>',
				width:800,
				height:500,
				buttons: '#dlg-buttons'
			});
			
		</script>
	</c:if> --%>
</c:if>
<!-- 供货商部分 -->
<c:if test="${not empty sessionScope.WEB_PROVIDER_TOKEN}">
	<%-- <c:if test="${sessionScope.WEB_PROVIDER_TOKEN.userType eq '2' && sessionScope.WEB_PROVIDER_TOKEN.isCompact eq '0' }">
	  	<script>
			/*****
			$.pmsDialog({
				id:'compact_win',
				title:'签订供货商合同',
				method:'post',
				href:'<c:url value="/views/jsp/center/compact/compact_detail.jsp"/>',
				width:800,
				height:500,
				buttons: '#dlg-buttons'
			});
			****/
		</script>
	</c:if> --%>
</c:if>
<script>

function savecompact(){
	$.pmsAjax({
		url:'<c:url value="/user/signContract.s"/>',
		data:{},
		success:function(data){
			if(data.code=="200"){
				 layer.msg("签订网站电子合同成功",1, {type: 1,shade: [0.2, '#ccc']});
				$("#compact_win").dialog('close');
			}else{
				alertError(data.result);
			}
		}
	});
	
}
</script>